placessidebar: Fix bookmarks dnd
authorMatthias Clasen <mclasen@redhat.com>
Sat, 8 Aug 2020 17:47:23 +0000 (13:47 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 8 Aug 2020 18:11:29 +0000 (14:11 -0400)
We were not handling drops of bookmarks correctly,
leading to criticals during DND.

Fixes: #3037
gtk/gtkplacessidebar.c

index 531dd0e176abeb52ba917f49138e5f78ee92c689..f72301e60ff02fc12e70f0b169d4be038d8ffed2 100644 (file)
@@ -1846,7 +1846,7 @@ drag_drop_callback (GtkDropTarget    *target,
 
   if (G_VALUE_HOLDS (value, GTK_TYPE_SIDEBAR_ROW))
     {
-      GtkWidget **source_row;
+      GtkWidget *source_row;
       /* A bookmark got reordered */
       if (target_section_type != SECTION_BOOKMARKS)
         goto out;
@@ -1856,7 +1856,7 @@ drag_drop_callback (GtkDropTarget    *target,
       if (sidebar->row_placeholder != NULL)
         g_object_get (sidebar->row_placeholder, "order-index", &target_order_index, NULL);
 
-      reorder_bookmarks (sidebar, GTK_SIDEBAR_ROW (*source_row), target_order_index);
+      reorder_bookmarks (sidebar, GTK_SIDEBAR_ROW (source_row), target_order_index);
       result = TRUE;
     }
   else if (G_VALUE_HOLDS (value, GDK_TYPE_FILE_LIST))